

<%@page import="java.text.SimpleDateFormat"%>
<%@include file="header.jsp"%>
<%@page import="jobportal.Dbconn"%>
<%@page import="java.sql.*" %>
<%
            Connection con = null;
            Statement st = null;
            String username = (String) session.getAttribute("username");


            try {
                con = Dbconn.getConn();
                st = con.createStatement();
                ResultSet rs;

                String sql = "select compname,jobtitle,walkindate,venue,jobs.compid,jobs.jobid from job_applied,jobs,company where job_applied.jobid=jobs.jobid and jobs.compid=company.compid and username='" + username + "'";
//out.println(sql);
                rs = st.executeQuery(sql);
                java.util.Date dt;
                SimpleDateFormat df;
                String date;

%>
<style type="text/css">
    <!--
    .style1 {font-weight: bold}
    -->
</style>

<table id="tbl">
    <tr><td>
            <span class="mainheading_js">Job Manager &raquo; My Applications</span><img src="../images/blank.gif" alt="blank" width="18" height="17" border="0" />
            <span class="messagesred"></span>
        </td></tr>
    <tr><td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_bdr">

                <tr>
                    <td class="sde_mnu_hdr_blue"><img src="../images/top_left.gif"; class="sde_mnu_img2" style="margin-left:3px; margin-top:3px;"/>My Sent / Applied jobs    </td>
                </tr>
                <tr>
                    <td style="padding-left:5px;">This feature is to track job(s) applied  </td>
                </tr>
                <tr>
                    <td><table  width="100%" border="0" cellpadding="0" cellspacing="0" >
                            <tr>
                                <td align="left" valign="top" style="padding:4px">
                                    <table class="tbl_bdr" width="100%" border="0" cellpadding="0" cellspacing="0" style="text-align: center">
                                        <tr style="background-color: lightskyblue;text-align: center">
                                            <td class="sde_mnu_hdr_blue" width="6%" style="padding-left:5px;">#</td>
                                            <td class="sde_mnu_hdr_blue" height="20" style="padding-left:5px;" colspan="2"><strong>Company Name</strong></td>
                                            <td width="20%" class="sde_mnu_hdr_blue"><strong>Job Title</strong></td>
                                            <td width="15%" class="sde_mnu_hdr_blue"><strong>Walk in Date</strong></td>
                                            <td class="sde_mnu_hdr_blue" width="20%" align="center"><strong>Test Place</strong></td>
                                        </tr>
                                        <%
                                                        for (int i = 1; rs.next(); i++) {
                                        %>


                                        <tr >
                                            <td class="link" style="padding-left:5px; text-transform:capitalize;"><%=i%></td>
                                            <td class="link" style="padding-left:5px; text-transform:capitalize;" height="17" width="12%"><span class="link" style="padding-left:5px; text-transform:capitalize;"><img src="../src/getpic.jsp?id=<%=rs.getString("compid")%>&table=company&col=logo&pk_col=compid" height="34" width="78" /></span><a href='../#' class='alink'></a></td>
                                            <td class="link" style="padding-left:5px; text-transform:capitalize;" width="27%"><a href='#' class='alink'><%=rs.getString("compname")%></a></td>
                                            <td class="link" style="text-transform:capitalize;"><a href="viewjobdetails.jsp?jobid=<%=rs.getString("jobid")%>" class='alink'><%=rs.getString("jobtitle")%></a></td>
                                            <td class="sde_mnu_hdr_blue_middle">
                                                <%
                                                dt = rs.getDate("walkindate");
                                                df = new SimpleDateFormat("dd-MMM-yyyy");
                                                date=df.format(dt);
                                                out.println(date);
                                                %>
                                            </td>
                                            <td align="center" class="sde_mnu_hdr_blue_middle"><%=rs.getString("venue")%></td>
                                        </tr>
                                        <tr style="height: 10px">
                                            <td colspan="6"></td>
                                        </tr>

                                        <%}%>


                                        <tr style="background-color: lightskyblue;text-align: center">
                                            <td colspan="5" class="sde_mnu_hdr_blue">&nbsp;</td>
                                            <td class="sde_mnu_hdr_blue"><div align="right"></div></td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table></td>
                </tr>
            </table>
        </td></tr>
    <%
                } catch (Exception e) {
                    out.println("Exception::" + e);
                } finally {
                    st.close();
                    con.close();
                }
    %>
    <%@include file="footer.jsp" %>